<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@ include file="../../attr.jsp" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=emulateIE7"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link rel="stylesheet" href="${ctx}/css/sapar.css"/>
    <link rel="stylesheet" type="text/css" href="${ctx}/css/common.css"/>
    <script type="text/javascript" src="${ctx}/js/jquery.js"></script>
    <script type="text/javascript" src="${ctx}/js/sapar.js"></script>
    <script type="text/javascript" src="${ctx}/js/WdatePicker.js"></script>
    <script type="text/javascript" src="${ctx}/assets/layer/layer.js"></script>
    <script type="text/javascript" src="${ctx}/js/kkpager.min.js"></script>
    <script type="text/javascript" src="${ctx}/assets/laydate/laydate.js"></script>
    <script type="text/javascript" src="${ctx}/js/mask.js"></script>
    <link rel="stylesheet" type="text/css" href="${ctx}/css/kkpager_blue.css"/>

    <link href="${ctx}/css/tabStyle.css" rel="stylesheet" type="text/css">


    <style type="text/css">
        #sidebar-tab {
            border: 1px solid #ccf;
            margin-bottom: 1.5em;
            overflow: hidden;
        }

        #tab-title h3 {
            color: #666;
            font-size: 15px;
            font-weight: 400;
        }

        #tab-title .selected {
            color: #356aa0;
            border-bottom: 0px;
        }

        /*标题被选中时的样式*/
        #tab-title span {
            padding: 5px 9px 5px 10px;
            border: 1px solid #ccf;
            border-right: 0px;
            margin-left: -1px;
            cursor: pointer;
        }

        #tab-content .hide {
            display: none;
        }

        /*默认让第一块内容显示，其余隐藏*/
        #tab-content ul {
            padding: 5px 10px;
            overflow: hidden;
        }

        #tab-content ul li {
            padding-top: 5px;
            height: 20px;
        }
    </style>

    <title>清洗消毒</title>
    <style type="text/css">
        #left {
            float: left;
            width: 100%;
        }

        #saper-container {
            float: left;
            width: 100%;
            background: url(../images/dian.png) repeat-y 69% 0;
        }

        #table_left {
            float: left;
            width: 68%;
            min-height: 300px
        }

        #right {
            float: right;
            width: 30%;
            min-height: 300px
        }
    </style>
</head>

<body>
<div id="left">
    <!-- 遮罩层 -->
    <div id="mask" class="mask"></div>
    <div id="saper-container">
        <div id="saper-hd"></div>
        <div id="saper-bd">
            <div class="subfiled-content">
                <!--表格开始-->
                <div id="table_left" class="table">
                    <div class="subfiled clearfix">
                        <h2>清洗消毒</h2>
                    </div>
                    <!--表格操作-->
                    <div class="table-operate ue-clear">
                        <a href="javascript:;" class="add">添加</a>
                        <a href="javascript:;" class="edit">修改</a>
                        <!--                         <a href="javascript:;" class="del">删除</a> -->
                    </div>

                    <ul class="tabs">
                        <li><a href="#" name=".tab1_1">未清洗</a></li>
                        <li><a href="#" name=".tab1_2">清洗中</a></li>
                        <li><a href="#" name=".tab1_3">清洗完成</a></li>
                    </ul>

                    <div class="content">
                        <div class="tab1_1">
                            <form action="" id="weiQingxi">
                                <table class="detail">
                                    <thead>
                                    <tr>
                                        <th><input type="checkbox" name="key" class="quanxuan">操作</th>
                                        <th>清洗流水</th>
                                        <th>清洗机器</th>
                                        <th>清洗软件</th>
                                        <th>清洗人名称</th>
                                        <th>清洗开始时间</th>
                                        <th>清洗结束时间</th>
                                        <th>清洗状态</th>
                                        <th>审核状态</th>
                                        <th>数据日期</th>

                                    </tr>
                                    </thead>
                                    <tbody class="package">
                                    <c:if test="${qingxiList != null}">
                                        <!-- var 是给给他起名字 -->
                                        <c:forEach items="${qingxiList}" var="qingxiList">
                                            <tr data="${qingxiList.qingxiLiushui}" class="qingxidata">
                                                <td><input type="checkbox" name="qingxiLiushui"
                                                           value=${qingxiList.qingxiLiushui }/>
                                                </td>
                                                <td>${qingxiList.qingxiLiushui }</td>
                                                <td>${equipMap[qingxiList.qingxiShebeiTiaoma+0].equipName}</td>
                                                <td>${softMap[qingxiList.qingxiRuanjianTiaoma+0].softName}</td>
                                                <td>${empmap[qingxiList.qingxiQingxirenTiaoma]}</td>
                                                <td><fmt:formatDate value="${qingxiList.qingxiKaishiTime}"
                                                                    type="date" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                                                <td><fmt:formatDate value="${qingxiList.qingxiJieshuTime}"
                                                                    type="date" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                                                <td class="finish">
                                                    <c:if test="${qingxiList.qingxiZhuangtai==0}">未清洗</c:if>
                                                    <c:if test="${qingxiList.qingxiZhuangtai==1}">清洗中</c:if>
                                                    <c:if test="${qingxiList.qingxiZhuangtai==2}"><a
                                                            id="finish">1</a><img src="../images/zs_finish.png"/></c:if>
                                                </td>

                                                <td>
                                                    <c:if test="${qingxiList.qingxiHege==0}">未审核</c:if>
                                                    <c:if test="${qingxiList.qingxiHege==1}">审核完成</c:if>
                                                    <c:if test="${qingxiList.qingxiHege==2}">不合格</c:if>
                                                </td>
                                                <td><fmt:formatDate value="${qingxiList.recordTime}"
                                                                    type="date" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                                            </tr>
                                        </c:forEach>
                                    </c:if>
                                    </tbody>
                                </table>

                            </form>
                            <div id="kkpager"></div>
                            <div></div>
                            <input class="butLeft" type="button" value="上一页"/>
                            <input class="butRight" type="button" value="下一页"/>
                            <span>到第&nbsp;</span><input class="textBox textBox1" type="text" value="1"/><span
                                style="margin-left: 4px;">页&nbsp;</span>
                            <input class="sure1" type="button" value="确定"/>
                            <span>共</span><span class="totalPages">0</span><span>&nbsp;页</span><br>


                            <a href="javascript:;" class="sapar-btn sapar-btn-recom query-btn" id="start">开始清洗</a>
                        </div>
                        <div class="tab1_2">
                            <form action="" id="nowQingxi">
                                <table class="detail">
                                    <thead>
                                    <tr>
                                        <th><input type="checkbox" name="key" class="quanxuan">操作</th>
                                        <th>清洗流水</th>
                                        <th>清洗机器</th>
                                        <th>清洗软件</th>
                                        <th>清洗人名称</th>
                                        <th>清洗开始时间</th>
                                        <th>清洗结束时间</th>
                                        <th>清洗状态</th>
                                        <th>审核状态</th>
                                        <th>数据日期</th>
                                    </tr>
                                    </thead>
                                    <tbody class="package">
                                    </tbody>
                                </table>

                            </form>
                            <input class="butLeft" type="button" value="上一页"/>
                            <input class="butRight" type="button" value="下一页"/>
                            <span>到第&nbsp;</span><input class="textBox textBox2" type="text" value="1"/><span
                                style="margin-left: 4px;">页&nbsp;</span>
                            <input class="sure2" type="button" value="确定"/>
                            <span>共</span><span class="totalPages">0</span><span>&nbsp;页</span><br>
                            <a href="javascript:;" class="sapar-btn sapar-btn-recom query-btn" id="end">结束清洗</a>

                        </div>
                        <div class="tab1_3">
                            <table class="detail">
                                <thead>
                                <tr>
                                    <th><input type="checkbox" name="key" class="quanxuan">操作</th>
                                    <th>清洗流水</th>
                                    <th>清洗机器</th>
                                    <th>清洗软件</th>
                                    <th>清洗人名称</th>
                                    <th>清洗开始时间</th>
                                    <th>清洗结束时间</th>
                                    <th>清洗状态</th>
                                    <th>审核状态</th>
                                    <th>数据日期</th>
                                </tr>
                                </thead>

                                <tbody class="package">

                                </tbody>
                            </table>
                            <input class="butLeft" type="button" value="上一页"/>
                            <input class="butRight" type="button" value="下一页"/>
                            <span>到第&nbsp;</span><input class="textBox textBox3" type="text" value="1"/><span
                                style="margin-left: 4px;">页&nbsp;</span>
                            <input class="sure3" type="button" value="确定"/>
                            <span>共</span><span class="totalPages">0</span><span>&nbsp;页</span><br>
                        </div>
                    </div>

                    <!--表格具体内容-->

                </div><!--表格结束-->
                <div id="right">
                    <div class="table">
                        <div class="table-box">
                            <table id="detail">
                                <thead>
                                <tr>
                                    <th>网篮条码</th>
                                    <th>包条码</th>
                                    <th>包名称</th>
                                </tr>
                                </thead>
                                <tbody class="packagedetail">

                                </tbody>
                            </table>
                        </div>
                        <div>
                            <input id="leftPage" type="button" value="上一页"/>
                            <input id="rightPage" type="button" value="下一页"/>
                            <span>到第&nbsp;</span><input id="goPage" type="text" value="1"/><span
                                style="margin-left: 4px;">页&nbsp;</span>
                            <input id="sureBut" type="button" value="确定"/>
                            <span>共</span><span id="totalNum">1</span><span>&nbsp;页</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div id="saper-ft">
        </div>
    </div>
</div>
<script type="text/javascript">

    var pageSize = 10, currentPage = 1, totalPage = 1;
    var totalQxPage = 1;
    var currentQxPage = 1;
    var data = [];
    var qingxidata = [];

    function getSelRecord() {
        var chk_value = [];
        $('input[name="qingxiLiushui"]:checked').each(function () {
            chk_value.push($(this).val());
        });
        return chk_value;
    }


    $("#start").click(function () {
        var status = 0;
        var chk_value = getSelRecord();
        if (chk_value.length > 0) {
            showMask();
            $.ajax({
                type: "post",
                url: "${ctx}/qingxi/qingxiTime.do?status=" + status,
                error: function () {
                    layer.alert("网络故障，稍后再试");
                },
                data: $("#weiQingxi").serialize(),
                success: function (data) {
                    if (data.status == "true") {
                        window.location.reload();
                        hideMask();
                    } else {
                        layer.msg(data.msg);
                    }
                }
            });
        } else {
            layer.msg("选择数据");
        }

    })

    //全选
    $(".quanxuan").live("click", function () {
        $(".package").find("input[name='qingxiLiushui']").each(function () {
            ck = $(this);
            if (ck.prop('checked')) {
                ck.prop('checked', false);
            } else {
                ck.prop('checked', true);
            }
        });
    })

    $("#end").click(function () {
        var status = 1;
        var chk_value = getSelRecord();
        if (chk_value.length > 0) {
            showMask();
            console.log("dd");
            $.ajax({
                type: "post",
                url: "${ctx}/qingxi/qingxiTime.do?status=" + status,
                error: function () {
                    layer.alert("网络故障，稍后再试");
                },
                data: $("#nowQingxi").serialize(),
                success: function (data) {

                    if (data.status == "true") {
                        window.location.reload();
                        hideMask();
                    } else {
                        layer.msg(data.msg);
                    }
                }
            });
        } else {
            layer.msg("选择数据");
        }

    })


    $(".tabs a").on("click", function (e) {
        var status = $(this).parent().index("li");
        $.ajax({
            type: "post",
            url: "${ctx}/qingxi/qingxiActionZhuangList.do?status=" + status,
            error: function () {
                layer.alert("网络故障，稍后再试");
            },
            success: function (data) {
                if (data.status == "true") {
                    console.log(data);
                    appendQxTable(data);
// 				var qingxiList = data.qingxiList;

// 				if(qingxiList.length!=0){

// 				}else{
// 					$(".detail tbody").empty();
// 					qingxidata = [];
// 					totalPage=0;
// 				}

// 	           	 var qingxiList = data.qingxiList;
// 	           	 var str = '';
// 	           	 $(".detail tbody").empty();
// 	           	 for(var i = 0; i<qingxiList.length;i++){
// 	           		var startTime = qingxiList[i].qingxiKaishiTime;
// 	           		var endTime = qingxiList[i].qingxiJieshuTime;
// 	           		var recordTime = qingxiList[i].recordTime;
// 	           		var qingxiLiushui = qingxiList[i].qingxiLiushui;
// 	           		var qxZt = qingxiList[i].qingxiZhuangtai;
// 	           		var qxHg = qingxiList[i].qingxiHege;
// 	           		if(isNullOrEmpty(startTime)){
// 	           			startTime = "";
// 	           		}
// 	           		if(isNullOrEmpty(endTime)){
// 	           			endTime = "";
// 	           		}
// 	           		if(qxZt==0){
// 	           			qxZt = '未清洗';
// 	           		}
// 	           		if(qxZt == 1){
// 	           			qxZt = '清洗中';
// 	           		}
// 	           		if(qxZt == 2){
// 	           			qxZt = '清洗结束';
// 	           		}
// 	           		if(qxHg == 0){
// 	           			qxHg = '未审核';
// 	           		}
// 	           		if(qxHg == 1){
// 	           			qxHg = '合格';
// 	           		}
// 	           		if(qxHg == 2){
// 	           			qxHg = '不合格';
// 	           		}
// 	           		str += "<tr data="+qingxiList[i].qingxiLiushui+" class='qingxidata'><td><input type='checkbox' name='qingxiLiushui' value='"+qingxiList[i].qingxiLiushui+"' /></td>"
// 	           		+"<td>"+qingxiList[i].qingxiLiushui+"</td><td>"+qingxiList[i].qingxiShebeiName+"</td><td>"+qingxiList[i].qingxiRuanjianName+"</td>"
// 	           		+"<td>"+qingxiList[i].qingxiQingxirenTiaoma+"</td>"
// 	           		+"<td>"+startTime+"</td>"
// 	           		+"<td>"+endTime+"</td>"
// 	           		+"<td>"+qxZt+"</td><td>"+qxHg+"</td>"
// 	           		+"<td>"+qingxiList[i].recordTime+"</td>"
// 	           		+"</tr>";


// 	           	 }
// 	           	 $(".detail tbody").append(str);
                } else {
                    layer.msg(data.msg);
                }
            }
        });


    });

    $(function () {
        var totalPage = ${total};
        var pageNo = getParameter('pageIndex');
        if (!pageNo) {
            pageNo = 1;
        }
        //生成分页
        //有些参数是可选的，比如lang，若不传有默认值
        kkpager.generPageHtml({
            pno: pageNo,
            //总页码
            total: totalPage,
            //链接前部
            hrefFormer: '${ctx}/qingxi/qingxiActionList',
            //链接尾部
            hrefLatter: '.do',
            getLink: function (n) {
                return this.hrefFormer + this.hrefLatter + "?pageIndex=" + n + "&searchTxt=" + $(".search_text").val();
            }
        });

        $(".qingxidata").live("click", function () {
            $(this).addClass("xuanzhong").siblings().removeClass("xuanzhong");
            var liushuiId = $(this).attr("data");
            $.ajax({
                type: "post",
                url: "${ctx}/qingxi/qingxiMingxiList.do?id=" + liushuiId,
                error: function () {
                    layer.alert("网络故障，稍后再试");
                },
                success: function (data) {
                    if (data.status == "true") {
                        appendTable(data);
// 		 	           	var dataList = data.zsWanglanpacklist;
// 		 	           	$(".packagedetail").empty();
// 		 	           	var str = "";
 // 	 	           		for(var i = 0; i<dataList.length;i++){
// 	 	           			str += "<tr class='packMx "+dataList[i].packageTiaoma+"'  data='"+dataList[i].packageId+"'><td>"+dataList[i].wanglanTiaoma+"</td>"
// 		 	           		+"<td>"+dataList[i].packageTiaoma+"</td><td>"+dataList[i].packageName+"</td>"
// 	 	           			+"</tr>";
// 	 	           		}
// 	 	           		$(".packagedetail").append(str);     	 
                    } else {
                        layer.msg(data.msg);
                    }
                }
            });

        });

        $(".packMx").live("dblclick", function () {
            $(this).addClass("xuanzhong").siblings().removeClass("xuanzhong");
            var packId = $(this).attr("data");
            //找儿子的典例
            var name = $(this).find("td:eq(2)").text();
            layer.open({
                type: 2,
                title: name + '包明细',
                maxmin: true,
                shadeClose: true, //点击遮罩关闭层
                area: ['800px', '520px'],
                content: '${ctx}/wutiaoma/findQixieListPeibao.do?id=' + packId + '&name=' + name
            });
        })


        $(".add").click(function () {
            window.location.href = "${ctx}/qingxi/qingxiInput.do";
        });

        $(".edit").click(function () {
            var chk_value = getSelRecord();

            if (chk_value.length == 1) {
                window.location.href = "${ctx}/qingxi/qingxiEdit.do?qingxiLiushui=" + chk_value[0];
            } else {
                layer.msg("请选择并只能选择一条数据！");
            }
        });

        $("#sureBut").click(function () {
            goPage();
        });
        $(".sure1").click(function () {
            goQxPage('1');
        });
        $(".sure2").click(function () {
            goQxPage('2');
        });
        $(".sure3").click(function () {
            goQxPage('3');
        });
        $("#leftPage").click(function () {
            leftPages();
        });
        $(".butLeft").click(function () {
            leftQxPages();
        })
        $("#rightPage").click(function () {
            rightPages();
        });
        $(".butRight").click(function () {
            rightQxPages();
        });

//      

// 		$(".del").click(function(){
// 			var chk_value = getSelRecord();
// 			if(chk_value.length > 0){
// 				layer.confirm('你确定要删除么？', function(){
// 					$.ajax({
// 			             type: "POST",
// 			             url:"${ctx}/qingxi/qingxiDel.do?id="+chk_value.join(),
// 			             error: function(request) {
// 			            	 	layer.alert("网络故障，请稍后再试!");
// 			             },
// 			             success: function(data) {
// 			 	           	if(data.status=="true"){
// 				 	           	layer.alert("删除成功", function(){
// 				 	           		window.location.reload();
// 			           		    });
// 			 	           	}else{
// 			 	           		layer.msg(data.msg);
// 			 	           	}
// 			             }
// 			         });
// 				});
// 			}else{
// 				layer.msg('请选择要删除的数据！');
// 			}
// 		});


    });


    function isNullOrEmpty(strVal) {
        if (strVal != null) {
            strVal = strVal.replace(/(^\s*)|(\s*$)/g, "");
        }

        if (strVal == '' || strVal == null || strVal == undefined) {
            return true;
        } else {
            return false;
        }
    }

    function getParameter(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]);
        return null;
    }
    //  	 分页
    function appendTable(dataList) {
        currentPage = 1;
        data = dataList.zsWanglanpacklist;
//	         packageId = dataList.packageId;
        creatTab();
    }
    function appendQxTable(dataList) {

        currentQxPage = 1;
        qingxidata = dataList.qingxiList;
//	         packageId = dataList.packageId;
        console.log(qingxidata);
        creatQxTab();
    }
    //获得总页数
    function totalPages() {
        //如果刚好除尽
        if (data.length % pageSize == 0) {
            totalPage = data.length / pageSize;
        }
        else {
            totalPage = parseInt(data.length / pageSize) + 1;
        }
    }

    //获得总页数
    function totalQxPages() {
        //如果刚好除尽
        if (qingxidata.length != 0) {
            if (qingxidata.length % pageSize == 0) {
                totalQxPage = qingxidata.length / pageSize;
            }
            else {
                totalQxPage = parseInt(qingxidata.length / pageSize) + 1;
            }
        } else {
            totalQxPage = qingxidata.length + 1;
        }


    }

    //上一页
    function leftPages() {
        if (currentPage != 1) {
            currentPage--;
            //开始创建
            creatTab();
        }
    }
    //上一页
    function leftQxPages() {
        if (currentQxPage != 1) {
            currentQxPage--;
            //开始创建
            creatQxTab();
        }
    }
    //下一页
    function rightPages() {
        if (currentPage != totalPage) {
            currentPage++;
            //开始创建
            creatTab();
        }
    }

    //下一页
    function rightQxPages() {
        if (currentQxPage != totalQxPage) {
            currentQxPage++;
            //开始创建
            creatQxTab();
        }
    }
    //到第几页去
    function goPage() {
        currentPage = document.getElementById('goPage').value;
        //如果输入的页数超出总页数，则到最后一页去！
        if (currentPage > totalPage) {
            currentPage = totalPage;
        }
        if (currentPage < 1) {
            currentPage = 1;
        }
        creatTab();
    }
    //到第几页去
    function goQxPage(num) {
        var tar = "textBox" + num;

        currentQxPage = $("." + tar).val();

        //如果输入的页数超出总页数，则到最后一页去！
        if (currentQxPage > totalQxPage) {
            currentQxPage = totalQxPage;
        }
        if (currentQxPage < 1) {
            currentQxPage = 1;
        }
        creatQxTab(num);
    }
    //清洗的分页
    function creatQxTab(num) {
        //清空数据
        $(".detail tbody").empty();
//	  		$("#checkalltwo").attr("checked",false);
        //总页数
        totalQxPages();
        $('.totalPages').text(totalQxPage);
        //插入页数
        $('.textBox' + num + '').val(currentQxPage);
        var str = '';
//			$("#packagedetail").empty();
        currentRows = (totalQxPage == 1 || currentQxPage == totalQxPage) ? qingxidata.length : currentQxPage * pageSize;
        console.log(currentQxPage);
        console.log(currentRows);
        if (qingxidata.lengtn != 0) {
            for (var i = (currentQxPage - 1) * pageSize; i < currentRows; i++) {
                var startTime = qingxidata[i].qingxiKaishiTime;
                var endTime = qingxidata[i].qingxiJieshuTime;
                var recordTime = qingxidata[i].recordTime;
                var qingxiLiushui = qingxidata[i].qingxiLiushui;
                var qxZt = qingxidata[i].qingxiZhuangtai;
                var qxHg = qingxidata[i].qingxiHege;
                if (isNullOrEmpty(startTime)) {
                    startTime = "";
                }
                if (isNullOrEmpty(endTime)) {
                    endTime = "";
                }
                if (qxZt == 0) {
                    qxZt = '未清洗';
                }
                if (qxZt == 1) {
                    qxZt = '清洗中';
                }
                if (qxZt == 2) {
                    qxZt = '清洗结束';
                }
                if (qxHg == 0) {
                    qxHg = '未审核';
                }
                if (qxHg == 1) {
                    qxHg = '合格';
                }
                if (qxHg == 2) {
                    qxHg = '不合格';
                }
                str += "<tr data=" + qingxidata[i].qingxiLiushui + " class='qingxidata'><td><input type='checkbox' name='qingxiLiushui' value='" + qingxidata[i].qingxiLiushui + "' /></td>"
                    + "<td>" + qingxidata[i].qingxiLiushui + "</td><td>" + qingxidata[i].qingxiShebeiName + "</td><td>" + qingxidata[i].qingxiRuanjianName + "</td>"
                    + "<td>" + qingxidata[i].qingxiQingxirenTiaoma + "</td>"
                    + "<td>" + startTime + "</td>"
                    + "<td>" + endTime + "</td>"
                    + "<td>" + qxZt + "</td><td>" + qxHg + "</td>"
                    + "<td>" + qingxidata[i].recordTime + "</td>"
                    + "</tr>";
            }
        }


        console.log(str);
        $(".detail tbody").append(str);
    }
    //写的有些麻烦，为了跳页面不出错误。
    function creatQxTab() {
        //清空数据
        $(".detail tbody").empty();
//	  		$("#checkalltwo").attr("checked",false);
        //总页数
        totalQxPages();
        $('.totalPages').text(totalQxPage);
        //插入页数
        $('.textBox').val(currentQxPage);
        var str = '';
//			$("#packagedetail").empty();
        currentRows = (totalQxPage == 1 || currentQxPage == totalQxPage) ? qingxidata.length : currentQxPage * pageSize;
        console.log(currentQxPage);
        console.log(currentRows);
        if (qingxidata.length != 0) {
            for (var i = (currentQxPage - 1) * pageSize; i < currentRows; i++) {
                var startTime = qingxidata[i].qingxiKaishiTime;
                var endTime = qingxidata[i].qingxiJieshuTime;
                var recordTime = qingxidata[i].recordTime;
                var qingxiLiushui = qingxidata[i].qingxiLiushui;
                var qxZt = qingxidata[i].qingxiZhuangtai;
                var qxHg = qingxidata[i].qingxiHege;
                if (isNullOrEmpty(startTime)) {
                    startTime = "";
                }
                if (isNullOrEmpty(endTime)) {
                    endTime = "";
                }
                if (qxZt == 0) {
                    qxZt = '未清洗';
                }
                if (qxZt == 1) {
                    qxZt = '清洗中';
                }
                if (qxZt == 2) {
                    qxZt = '清洗结束';
                }
                if (qxHg == 0) {
                    qxHg = '未审核';
                }
                if (qxHg == 1) {
                    qxHg = '合格';
                }
                if (qxHg == 2) {
                    qxHg = '不合格';
                }
                str += "<tr data=" + qingxidata[i].qingxiLiushui + " class='qingxidata'><td><input type='checkbox' name='qingxiLiushui' value='" + qingxidata[i].qingxiLiushui + "' /></td>"
                    + "<td>" + qingxidata[i].qingxiLiushui + "</td><td>" + qingxidata[i].qingxiShebeiName + "</td><td>" + qingxidata[i].qingxiRuanjianName + "</td>"
                    + "<td>" + qingxidata[i].qingxiQingxirenTiaoma + "</td>"
                    + "<td>" + startTime + "</td>"
                    + "<td>" + endTime + "</td>"
                    + "<td>" + qxZt + "</td><td>" + qxHg + "</td>"
                    + "<td>" + qingxidata[i].recordTime + "</td>"
                    + "</tr>";
            }
        }


        console.log(str);
        $(".detail tbody").append(str);
    }


    //清洗明细
    function creatTab() {
        //清空数据
        $(".packagedetail").empty();
//	  		$("#checkalltwo").attr("checked",false);
        //总页数
        totalPages();
        $('#totalNum').text(totalPage);
        //插入页数
        $('#goPage').val(currentPage);
        var str = '';
//			$("#packagedetail").empty();
        currentRows = (totalPage == 1 || currentPage == totalPage) ? data.length : currentPage * pageSize;
        console.log(currentPage);
        console.log(currentRows);
        for (var i = (currentPage - 1) * pageSize; i < currentRows; i++) {
            str += "<tr class='packMx " + data[i].packageTiaoma + "'  data='" + data[i].packageId + "'><td>" + data[i].wanglanTiaoma + "</td>"
                + "<td>" + data[i].packageTiaoma + "</td><td>" + data[i].packageName + "</td>"
                + "</tr>";
        }
        console.log(str);
        $(".packagedetail").append(str);
    }

    $(function () {
        loadTab();
    });

</script>
<script src="${ctx}/js/tabScript.js" type="text/javascript"></script>

</body>
</html>